<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/page/public/public-taglibs.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@ include file="/page/public/public-css.jsp"%>
</head>
<body class="no-skin">
	<div class="main-container" id="main-container">

		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<div class="page-content">
					<div class="row">
						<!-- /.page-header -->
						<div class="col-xs-12 col-sm-12 widget-container-col">
							<div class="widget-box widget-color-green">
								<!-- #section:custom/widget-box.options -->
								<div class="widget-header">
									<h5 class="widget-title">
										<i class="ace-icon fa fa-filter bigger-130"></i>查询内容
									</h5>
									<div class="widget-toolbar no-border"
										style="padding-top: 10px;">
										<a href="#" data-action="collapse" class="orange2"> <i
											class="1 ace-icon fa fa-chevron-up bigger-125 "></i>
										</a>
									</div>
									<div class="widget-toolbar no-border">
										<button type="button" class="btn btn-xs btn-yellow"  onClick="doQuery();">
											<i class="ace-icon fa fa-search icon-on-left"></i>查询
										</button>

										<button type="button" class="btn btn-xs btn-light" onClick="doQueryReset();">
											<i class="ace-icon fa fa-refresh"></i> 重置
										</button>
									</div>
								</div>

								<!-- /section:custom/widget-box.options -->
								<div class="widget-body">
									<div class="widget-main">
										<div class="clearfix">
											<div class="row">
												<div class="col-xs-12">
													<!-- PAGE CONTENT BEGINS -->
													<form id='queryForm' class="form-horizontal" role="form">
														<div class="form-group col-sm-4">
															<label class="col-sm-3 control-label no-padding-right">登录帐号</label>
															<div class="col-sm-9">
																<input type="text" name="account" placeholder="用户名/邮箱/手机号"
																	class="col-xs-12 col-sm-12 input-sm" />
															</div>
														</div>

														<div class="form-group col-sm-6">
															<label class="col-sm-2 control-label no-padding-right">登录时间</label>
															<div class="col-sm-10">
																<div class="input-group">
																	<input type="text"  placeholder="开始时间" class="form_datetime input-sm form-control"
																		name="begin_logintime" /> <span class="input-group-addon">
																		<i class="fa fa-exchange"></i>
																	</span> 
																	<input type="text" placeholder="结束时间" class="form_datetime input-sm form-control"
																		name="end_logintime" />
																</div>
															</div>
														</div>

													</form>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- /.span -->
					</div>
					<!-- /.row -->



					<div class="row">
						<!-- /.page-header -->
						<div class="col-xs-12 col-sm-12 widget-container-col">
							<div class="widget-box widget-color-green">
								<!-- #section:custom/widget-box.options -->
								<div class="widget-header">
									<h5 class="widget-title">
										<i class="ace-icon fa fa-table bigger-130"></i>数据列表
									</h5>

									<div class="widget-toolbar no-border"
										style="padding-top: 10px;">
										<a href="#" data-action="fullscreen" class="orange2"> <i
											class="ace-icon fa fa-expand bigger-125"></i>
										</a>
									</div>

									<div class="widget-toolbar no-border">
										<!-- 
										<button class="btn btn-xs btn-white btn-default ">
											<i class="ace-icon fa fa-plus bigger-120 blue"></i> 新增
										</button>

										<button class="btn btn-xs btn-white btn-default ">
											<i class="ace-icon fa fa-edit bigger-120 orange"></i> 修改
										</button>
										
										<button class="btn btn-xs btn-white btn-default ">
											<i class="ace-icon fa fa-file-text bigger-120 purple"></i> 查看
										</button>

										<button class="btn btn-xs  btn-white btn-default ">
											<i class="ace-icon fa fa-trash-o bigger-120 red2"></i> 删除
										</button>

										<button class="btn btn-xs btn-white btn-default ">
											<i class="ace-icon fa fa-refresh bigger-120 green"></i> 刷新
										</button>
										 -->

										<span style="padding-left: 20px;"> <i
											class="ace-icon fa fa-refresh bigger-120 "></i> 刷新
										</span>


									</div>
								</div>

								<!-- /section:custom/widget-box.options -->
								<div class="widget-body">
									<div class="widget-main"
										style="padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px;">
										<div class="clearfix">
											<div class="row">
												<div class="col-xs-12">
													<table id="dataTable" style="width: 100%"
														class="table table-striped table-bordered table-hover form-inline">
													</table>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- /.span -->
					</div>
					<!-- /.row -->






					<!--  
					<div class="row">
						<div class="col-xs-12">

							<div class="clearfix">
								<div class="pull-right tableTools-container"></div>
							</div>
							<div class="table-header">
								<i class="ace-icon fa fa-table bigger-130"></i>&nbsp; 数据列表
							</div>
							<div>
								<table id="dataTable" style="width: 100%"
									class="table table-striped table-bordered table-hover">
								</table>
							</div>
						</div>
					</div>
					-->

				</div>
			</div>
		</div>
	</div>

	<%@ include file="/page/public/public-js.jsp"%>
	<script type="text/javascript">
		$(function() {
			var initAction = function() {
				cmdList = ctx + "/system/loginLog/list";
			}

			var initDataTable = function() {
				dataTable = $('#dataTable').dataTable( {
		               //数据列控制（包括对应返回JSON属性名称，对应表头列索引位置、数据转换封装等）
					    "aoColumnDefs": [
					    		{
					    		  "sTitle":"日志编码",  //列名
					    		  "sName":"log_id",    //库表字段名
					    		  "mData": "log_id",   //JSON返回属性
					    		  "aTargets": [0], //第几列
					    		  "bVisible": false, //px 或者 %
					    		  "bSortable": false//是否排序，默认排序
						    	},
						    	{
					    		  "sTitle":"店家ID", 
					    		  "sName":"company_id",    
					    		  "mData": "company_id",  
					    		  "aTargets": [1], 
					    		  "bVisible": false, 
					    		  "bSortable": false
						    	},
						    	{
					    		  "sTitle":"登录账号",  
					    		  "sName":"account",   
					    		  "mData": "account",  
					    		  "aTargets": [2], 
					    		  "bSortable": true
						    	},
						    	{
					    		  "sTitle":"姓名",  
					    		  "sName":"name",   
					    		  "mData": "name",  
					    		  "aTargets": [3],
					    		  "bSortable": true
						    	},
						    	{
					    		  "sTitle":"IP", 
					    		  "sName":"ip",  
					    		  "mData": "ip",  
					    		  "aTargets": [4], 
					    		  "bSortable": false
				                },
						    	{
					    		  "sTitle":"登录时间", 
					    		  "sName":"login_time",  
					    		  "mData": "login_time",  
					    		  "aTargets": [5],
					    		  "bSortable": true
						    	},
						    	{
					    		  "sTitle":"浏览器类型", 
					    		  "sName":"browser",  
					    		  "mData": "browser",  
					    		  "aTargets": [6], 
					    		  "bSortable": false
				                },
						    	{
						    		  "sTitle":"浏览器版本", 
						    		  "sName":"version",  
						    		  "mData": "version",  
						    		  "aTargets": [7], 
						    		  "bSortable": false
					           },
						    	{
					    		  "sTitle":"硬件", 
					    		  "sName":"device_type",  
					    		  "mData": "device_type",  
					    		  "aTargets": [8], 
					    		  "bSortable": true
				                },
						    	{
						    		  "sTitle":"操作系统", 
						    		  "sName":"os",  
						    		  "mData": "os",  
						    		  "aTargets": [9], 
						    		  "bSortable": true
					           }
		             	],
		                "aaSorting": [[5,"desc"]],//初始化加载，默认按第几列排序、排序方式（列从0开始计算）
		            	"sAjaxSource": cmdList //数据源URL
						
		 		});
			}
			initAction();
			initDataTable();
			
			
			 $('.form_datetime').datetimepicker({
				    format: "YYYY-MM-DD HH:mm:ss",
				    showTodayButton: true,
			        showClear: true,
			        showClose: true,
			  });
			 
		});
	</script>
</body>
</html>